/**
 * 
 */
package OOP_1;

/**
 * @Description
 * @author zych1108
 * @version
 * @date 2021年6月11日上午9:39:52
 */
public class Account {
	private double balance;
	
	public Account(double balance) {
		this.balance = balance;
	}
	
	public double getbalance() {
		return balance;
	}
	
	public void deposit(double amt) {
		balance += amt;
		System.out.println("成功存入："+ amt);
	}
	
	public void withdraw(double amt) {
		if(balance >= amt) {
			balance -= amt;
			System.out.println("成功取出："+ amt);
		}else {
			System.out.println("余额不足");
		}
	}
	
}
